import { Empty } from 'antd';
import React from 'react';

const searchIcon = require('./imgs/search.png');
const noDataIcon = require('./imgs/empty.png');
const imageStyle = { width: '88px', height: '88px', margin: 'auto' };
const t = window.$app.t;

export default ({ firstLoading, autoLoad }: { firstLoading: boolean, autoLoad: boolean }) => {
  const image = autoLoad || !firstLoading ? noDataIcon : searchIcon;
  const description = autoLoad || !firstLoading ? t('noData') : t('pleaseSearchFirst');

  return (
    <Empty imageStyle={imageStyle} image={image} description={description}/>
  )
}